﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="personaltabneide.aspx.cs" Inherits="BSCMFF.Web.Pages.working.personaltabneide" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<telerik:RadGrid ID="RadGridPersonalKPIs" runat="server" 
         AllowSorting="True" 
        AutoGenerateColumns="False"  CellSpacing="0" GridLines="None" 
        ShowGroupPanel="True" DataSourceID="EntityDataSourcePersonalKPIs" 
    ondeletecommand="RadGridPersonalKPIs_DeleteCommand" 
    onupdatecommand="RadGridPersonalKPIs_UpdateCommand" 
    onitemdatabound="RadGridPersonalKPIs_ItemDataBound" meta:resourcekey="RadGridPersonalKPIsResource1" 
    >
        <ClientSettings AllowDragToGroup="True">
        </ClientSettings>
        <MasterTableView DataKeyNames="Personal_KPI_ID"  ShowFooter="true"
            DataSourceID="EntityDataSourcePersonalKPIs" 
            >
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="KPI.Name" 
                    FilterControlAltText="Filter KPI column" 
                    HeaderText="KPI" SortExpression="KPI.Name" 
                    UniqueName="KPI.Name" meta:resourcekey="GridBoundColumnResource1">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Personal_KPI_ID" Visible="false"
                    FilterControlAltText="Filter Personal_KPI_ID column" 
                    HeaderText="Personal_KPI_ID" SortExpression="Personal_KPI_ID" 
                    UniqueName="Personal_KPI_ID" DataType="System.Int32" ReadOnly="True" 
                    meta:resourcekey="GridBoundColumnResource2">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name"
                    FilterControlAltText="Filter Name column" 
                    HeaderText="Name" SortExpression="Name" 
                    UniqueName="Name" meta:resourcekey="GridBoundColumnResource3">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Description" 
                    FilterControlAltText="Filter Description column" HeaderText="Description" 
                    SortExpression="Description" UniqueName="Description" 
                    meta:resourcekey="GridBoundColumnResource4">
                </telerik:GridBoundColumn>
               <%-- <telerik:GridBoundColumn DataField="Weight" 
                    FilterControlAltText="Filter Weight column" HeaderText="Weight (%)" 
                    SortExpression="Weight" UniqueName="Weight" DataType="System.Int32">
                    
                </telerik:GridBoundColumn>--%>
                <%--<telerik:GridTemplateColumn>
                    <HeaderTemplate>
                        <asp:Label ID="LabelWeightHeader" runat="server" Text="Weight"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LabelWeight" runat="server" DbValue='<%# Eval("Weight") %>'>
                        </asp:Label>
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:Label ID="LabelWeightSum" runat="server" >
                                                 
                        </asp:Label>
                        <asp:Label ID="LabelCurrentWeightSum" runat="server" >
                        </asp:Label>
                    </FooterTemplate>
                </telerik:GridTemplateColumn>--%>
                
                <telerik:GridBoundColumn DataField="User_FK" Visible="false"
                    FilterControlAltText="Filter User_FK column" 
                    HeaderText="User_FK" SortExpression="User_FK" 
                    UniqueName="User_FK" DataType="System.Int32" 
                    meta:resourcekey="GridBoundColumnResource5">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="KPI_FK" DataType="System.Int32" Visible="false"
                    FilterControlAltText="Filter KPI_FK column" HeaderText="KPI_FK" 
                    SortExpression="KPI_FK" UniqueName="KPI_FK" 
                    meta:resourcekey="GridBoundColumnResource6">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Measure"
                    FilterControlAltText="Filter Measure column" HeaderText="Measure" 
                    SortExpression="Measure" UniqueName="Measure" 
                    meta:resourcekey="GridBoundColumnResource7">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="StartValue" DataType="System.Int32" 
                    FilterControlAltText="Filter StartValue column" HeaderText="Start" 
                    SortExpression="StartValue" UniqueName="StartValue" 
                    meta:resourcekey="GridBoundColumnResource8">
                </telerik:GridBoundColumn>                
                <telerik:GridBoundColumn DataField="TargetValue" DataType="System.Int32" 
                    FilterControlAltText="Filter TargetValue column" HeaderText="Target" 
                    SortExpression="TargetValue" UniqueName="TargetValue" 
                    meta:resourcekey="GridBoundColumnResource9">
                </telerik:GridBoundColumn>
                
                <telerik:GridBoundColumn DataField="CurrentValue" DataType="System.Int32" 
                    FilterControlAltText="Filter CurrentValue column" HeaderText="Current" 
                    SortExpression="CurrentValue" UniqueName="CurrentValue" 
                    meta:resourcekey="GridBoundColumnResource10">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Percentage"
                    FilterControlAltText="Filter Percentage column" HeaderText="Percentage" 
                    SortExpression="Percentage" UniqueName="Percentage" 
                    meta:resourcekey="GridBoundColumnResource11">
                </telerik:GridBoundColumn>
               <%-- <telerik:GridBoundColumn DataField="Score" DataType="System.Int32" Visible="false"
                    FilterControlAltText="Filter Score column" HeaderText="Score" 
                    SortExpression="Score" UniqueName="Score">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="VerbalEvaluation" 
                    FilterControlAltText="Filter VerbalEvaluation column" HeaderText="VerbalEvaluation" 
                    SortExpression="VerbalEvaluation" UniqueName="VerbalEvaluation">
                </telerik:GridBoundColumn>--%>
                <telerik:GridButtonColumn Text="Edit" CommandName="Edit" 
                    meta:resourcekey="GridButtonColumnResource1" ></telerik:GridButtonColumn>
                <telerik:GridButtonColumn Text="Delete" CommandName="Delete" 
                    meta:resourcekey="GridButtonColumnResource2" ></telerik:GridButtonColumn>
                <%--<telerik:GridNumericColumn DataField="Weight" ></telerik:GridNumericColumn>--%>
            </Columns>
            <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UserControls/Details/PKPIDetails.ascx">
                
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                
            </EditFormSettings>
            
        </MasterTableView>
        
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>



<%--</telerik:RadAjaxPanel>--%>

    <asp:EntityDataSource ID="EntityDataSourcePersonalKPIs" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="Personal_KPI" Include="KPI" 
    Where="it.User_FK == @userID" EntityTypeFilter="" Select="">
        <WhereParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="userID" 
                QueryStringField="EmployeeID" DbType="Int32" />
        </WhereParameters>
    </asp:EntityDataSource>
        <asp:EntityDataSource ID="EntityDataSourceKPIs" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableFlattening="False" EntitySetName="KPIs" 
        Select="it.[KPI_ID], it.[Name]" EntityTypeFilter="">
    </asp:EntityDataSource>
</asp:Content>
